package com.itheima.d3_enumdemo;
/*
认识枚举类
 */
public class Test {
    public static void main(String[] args) {
        A a1 = A.X;
        A a2 = A.Y;
        A a3 = A.Z;
        System.out.println(a1);
        System.out.println(a2);
        System.out.println(a3);
        System.out.println(a1.ordinal());
        System.out.println(a2.ordinal());
        System.out.println(a3.ordinal());
        System.out.println(a1.name());
        System.out.println(a2.name());
        System.out.println(a3.name());
    }
}
